<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <%
    if (pin.Database.antiRechtsklik){out.println(pin.Header.rechtsKlikBeveiliging);}
    if (session.getAttribute("ingevoerd")!=null && !session.getAttribute("ingevoerd").equals("ja")) {
            //De Pas is niet ingevoerd !!
            //Redirect
            response.sendRedirect("index.jsp");
            //Als de redirect niet werkt, de meta-refresh.
            out.println("<meta http-equiv=\"refresh\" content=\"0;url=index.jsp\" />");
          } else {
            //De pas is ingevoerd
            // Eerst wat info van de pas halen ( welke bank enz.. )
            //pin.TrackInfo.Maak();
            //if (request.getParameter("a").equals("1")){
            //Code was FOUT !!
            //op het scherm laten zien dat het fout was
            //na 3x blokkeren of zo
            // }
          }
    %>
    <title>Lucky Bank</title>
    <link rel="stylesheet" type="text/css" href="bank.css" />
    <script type="text/javascript">
      <!--
      function knop(nummer){
        //getal toeveogen
        document.getElementById("codeVeld").value=document.getElementById("codeVeld").value+nummer;
        //ff checken
        if (document.getElementById("codeVeld").value.length == 4){
          //Ja heeft 4 tekens
          //alert('ja'); //om te checken of ie wel wat doet kan je ff een alert.
          document.formu.submit();
        }
      }

      function correctie(){
        //Leeg maken
        document.getElementById("codeVeld").value = "";
      }

      function stop(){
        //Gebruiker wil pas terug
        location.href="stop.jsp";
      }
      //-->
    </script>
  </head>
  <body>
    <table border="0" width="100%" id="hoogtabel"><tr><td valign="top">
          <% out.println(pin.Header.header);%>
      </td></tr>
      <!-- Einde Logo //-->
      <tr><td>
          <div class="groot">
            Voer uw Pincode in.
            <%
          if (request.getParameter("a") != null) {
            out.println("<br />Dat was NIET correct !!");
          }
            %>
          </div><br />
          <!--<small>
          <%
          out.println(session.getAttribute("track1")+"<br />"+session.getAttribute("track2")+"<br />"+session.getAttribute("track1")+"<br />");
          %>
          </small>//-->
          <form method="post" name="formu" action="controle.jsp">
            <!-- FF Nakijken iemand ! //-->
            <div class="groot" align="center" ><input class="groot" type="password" name="pincode" maxlength="4" size="4" id="codeVeld" /></div>
          </form>
      </td></tr>
      <tr valign="bottom"><td>
          <hr />
          <!-- Knoppen //-->
          <div align="center">
            <!-- 2 knoppen//-->
            <table><tr><td><input type="button" class="knop" onclick="correctie()" value="Correctie"><input type="button" class="knop" onclick="stop()" value="Stop"></table>
            <!-- Getallen //-->

            <table>
              <tr><td><input type="button" class="knop" onclick="knop('1')" value="1"><td><input type="button" class="knop" onclick="knop('2')" value="2"><td><input type="button" class="knop" onclick="knop('3')" value="3">
              <tr><td><input type="button" class="knop" onclick="knop('4')" value="4"><td><input type="button" class="knop" onclick="knop('5')" value="5"><td><input type="button" class="knop" onclick="knop('6')" value="6">
              <tr><td><input type="button" class="knop" onclick="knop('7')" value="7"><td><input type="button" class="knop" onclick="knop('8')" value="8"><td><input type="button" class="knop" onclick="knop('9')" value="9">
              <tr><td><td><input type="button" class="knop" onclick="knop('0')" value="0"><td>
          </table></div>
    </td></tr></table>
  </body>
</html>
